#! /usr/bin/env python
# -*- coding: utf-8 -*-

import os
import sys
import hashlib

def get_file_md5(src):
    if not os.path.isfile(src):
        return
    hash = hashlib.md5()
    f = file(src, 'rb')
    while 1:
        b = f.read(8192)
        if not b:
            break
        hash.update(b)
    f.close()
    return hash.hexdigest().upper()

print(get_file_md5(sys.argv[1]))
